COLOR PARTICLES

This command will set the color of new particles emitted from a particles object.

  Syntax
COLOR PARTICLES Particle Number, Red, Green, Blue
  Parameters
Particle Number
Integer
The particle object number
Red
Integer
The red colour value
Green
Integer
The green colour value
Blue
Integer
The blue colour value

  Returns

This command does not return a value.

  Description

By using a generally white image, the color you specify will show up the best from the particles. An image that is not white will produce a blending of colour between the image and the specified color.

  Example Code
load image "spec.bmp",3
make particles 3, 3, 10, 10.0
position particles 3, -3, 0, 10
position camera 0,1,0
point camera 0,1,400
while mouseclick()=0
if upkey()=1 then move camera 0.1
if downkey()=1 then move camera -0.1
if leftkey()=1 then turn camera left 1
if rightkey()=1 then turn camera right 1
color particles 3, rnd(255), rnd(255), rnd(255)
position particles 3, (mousex()-320)/50.0, 0, 10
sync
endwhile
delete particles 3
end
  See also

PARTICLES Commands Menu
Index